/*
 * COPYRIGHT(c) SK telecom 2009
 * This software is the proprietary information of SK telecom.
 *
 * Revision History
 * Author     Date          Description
 * --------   ----------    ------------------
 * 서영배            2009. 5. 4.    Description
 *
 */
package com.tistory.admin.adminmgr.auth.model;

import java.io.Serializable;

/**
 * TODO 세션에 저장할 회원정보
 * <p/>
 *
 * @author  서영배
 * @version 0.1
 */
public class LoginUserInfo implements Serializable {

	/** 회원번호 - IDP에서 내려주는 서비스Key */
    private String mbrNo;
    
    /** 회원구분코드 - 개인/사업자 */
    private String mbrClsCd;
    
    /** 회원분류코드 - 모바일전용/일반/무료개발/유료개발/SMILE BP */
    private String mbrCatCd;
    
    /**
     * 회원상태코드<p>
	 * 정상(모바일전용회원인증완료) / 가가입(이메일승인대기) / 정상(이메일승인완료) / 일시정지(7일이용정지/30일이용정지/영구이용정지) / 탈퇴(자의탈퇴/직권탈퇴)
     */
    private String mbrStatCd;
//    private String mbrApprDt; // 회원승인일자
    
    /** 회원ID */
    private String mbrId; 
    
    /** 회원명 */
    private String mbrNm;
    
    /** 상호명 */
    private String compNm;
    
    /** 사업자등록번호 */
    private String bizRegNo;
    
    /** 법인등록번호/대표자주민번호 */
    private String bizBpSocialNo;
    
    /** 핫라인휴대폰번호 */
    private String bizHotHpNo;
    
    /** idp 인증키*/
    private String authKey;
    
    private String emailAddr;
    
    /** 유저 타입<br>
     * 일반회원 : "CP" / 운영자 : "AD" / 시스템운영자 : "SU" */
    private String memberType;
    
    
    
    /** 로그인 경로 설정 */
    private String loginPath;
    
    private String user_id;
    private String user_name;	// 사용자 이름
    private String right_cd;	// 권한 코드	
    private String sysdate;		// sysdate
    
    
    public LoginUserInfo() {
    }
    
    public LoginUserInfo(String mbrNo, String mbrClsCd, String mbrId) {
        setMbrNo(mbrNo);
        setMbrClsCd(mbrClsCd);
        setMbrId(mbrId);
    }
    /**
     * @return mbrNo 값을 반환한다.
     */
    public String getMbrNo() {
        return mbrNo;
    }
    /**
     * @param mbrNo 을 mbrNo 에 저장한다.
     */
    public void setMbrNo( String mbrNo ) {
        this.mbrNo = mbrNo;
    }

    /**
     * @return mbrClsCd 값을 반환한다.
     */
    public String getMbrClsCd() {
        return mbrClsCd;
    }
    /**
     * @param mbrClsCd 을 mbrClsCd 에 저장한다.
     */
    public void setMbrClsCd( String mbrClsCd ) {
        this.mbrClsCd = mbrClsCd;
    }
    /**
     * @return mbrCatCd 값을 반환한다.
     */
    public String getMbrCatCd() {
        return mbrCatCd;
    }
    /**
     * @param mbrCatCd 을 mbrCatCd 에 저장한다.
     */
    public void setMbrCatCd( String mbrCatCd ) {
        this.mbrCatCd = mbrCatCd;
    }
    /**
     * @return mbrStatCd 값을 반환한다.
     */
    public String getMbrStatCd() {
        return mbrStatCd;
    }
    /**
     * @param mbrStatCd 을 mbrStatCd 에 저장한다.
     */
    public void setMbrStatCd( String mbrStatCd ) {
        this.mbrStatCd = mbrStatCd;
    }
//    /**
//     * @return mbrApprDt 값을 반환한다.
//     */
//    public String getMbrApprDt() {
//        return mbrApprDt;
//    }
//    /**
//     * @param mbrApprDt 을 mbrApprDt 에 저장한다.
//     */
//    public void setMbrApprDt( String mbrApprDt ) {
//        this.mbrApprDt = mbrApprDt;
//    }
    /**
     * @return mbrId 값을 반환한다.
     */
    public String getMbrId() {
        return mbrId;
    }
    /**
     * @param mbrId 을 mbrId 에 저장한다.
     */
    public void setMbrId( String mbrId ) {
        this.mbrId = mbrId;
    }
    /**
     * @return mbrNm 값을 반환한다.
     */
    public String getMbrNm() {
        return mbrNm;
    }
    /**
     * @param mbrNm 을 mbrNm 에 저장한다.
     */
    public void setMbrNm( String mbrNm ) {
        this.mbrNm = mbrNm;
    }
    /**
     * @return compNm 값을 반환한다.
     */
    public String getCompNm() {
        return compNm;
    }
    /**
     * @param compNm 을 compNm 에 저장한다.
     */
    public void setCompNm( String compNm ) {
        this.compNm = compNm;
    }

	public String getBizRegNo() {
		return bizRegNo;
	}

	public void setBizRegNo(String bizRegNo) {
		this.bizRegNo = bizRegNo;
	}

	public String getBizBpSocialNo() {
		return bizBpSocialNo;
	}

	public void setBizBpSocialNo(String bizBpSocialNo) {
		this.bizBpSocialNo = bizBpSocialNo;
	}

	public String getBizHotHpNo() {
		return bizHotHpNo;
	}

	public void setBizHotHpNo(String bizHotHpNo) {
		this.bizHotHpNo = bizHotHpNo;
	}

	public String getAuthKey() {
		return authKey;
	}

	public void setAuthKey(String authKey) {
		this.authKey = authKey;
	}

	public String getMemberType() {
		return memberType;
	}

	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}

	public String getEmailAddr() {
		return emailAddr;
	}

	public void setEmailAddr(String emailAddr) {
		this.emailAddr = emailAddr;
	}
	


	public String getLoginPath() {
		return loginPath;
	}

	public void setLoginPath(String loginPath) {
		this.loginPath = loginPath;
	}

	
	/**
	 * @return the user_id
	 */
	public String getUser_id() {
		return user_id;
	}

	/**
	 * @param user_id the user_id to set
	 */
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	/**
	 * @return the user_name
	 */
	public String getUser_name() {
		return user_name;
	}

	/**
	 * @param user_name the user_name to set
	 */
	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	/**
	 * @return the right_cd
	 */
	public String getRight_cd() {
		return right_cd;
	}

	/**
	 * @param right_cd the right_cd to set
	 */
	public void setRight_cd(String right_cd) {
		this.right_cd = right_cd;
	}

	/**
	 * @return the sysdate
	 */
	public String getSysdate() {
		return sysdate;
	}

	/**
	 * @param sysdate the sysdate to set
	 */
	public void setSysdate(String sysdate) {
		this.sysdate = sysdate;
	}

	public void setDefaultMemberInfo(MemberInfo member) {
		setAuthKey(member.getAuthKey());
		
		setMbrNo(member.getMbrNo());
//        setMdnNo(member.getMdnNo());
        setMbrClsCd(member.getMbrClsCd());
        setMbrCatCd(member.getMbrCatCd());
//        setDevTpCd(member.getDevTpCd());
//        setDevMbrStatCd(member.getDevMbrStatCd());
        setMbrStatCd(member.getMbrStatCd());
//        setMobileCnt(member.getMobileCnt());
//        setMbrStartDt(member.getMbrStartDt());
//        setMbrEndDt(member.getMbrEndDt());
//        setMbrApprDt(member.getMbrApprDt());
        setMbrId(member.getMbrId());
        setMbrNm(member.getMbrNm());
//        setBirthDt(member.getBirthDt());
//        setBirthCls(member.getBirthCls());
//        setSex(member.getSex());
//        setZipCd(member.getZipCd());
//        setHomeAddr(member.getHomeAddr());
//        setHomeAddrDtl(member.getHomeAddrDtl());
        setEmailAddr(member.getEmailAddr());
//        setEmailYn(member.getEmailYn());
//        setRealNmAuthYn(member.getRealNmAuthYn());
//        setNateIdUseYn(member.getNateIdUseYn());
//        setNateIdStartDt(member.getNateIdStartDt());
//        setSmsYn(member.getSmsYn());
//        setPubAuthYn(member.getPubAuthYn());
        /** 담당자 관련 */
//        setOpNm(member.getOpNm());
//        setOpEmailAddr(member.getOpEmailAddr());
//        setOpTelNo(member.getOpTelNo());
//        setOpHpNo(member.getOpHpNo());
        /** 사업자 관련 */
        setCompNm(member.getCompNm());
        setBizRegNo(member.getBizRegNo());
//        setBizCondNm(member.getBizCondNm());
//        setBizKindNm(member.getBizKindNm());
//        setBizCatCd(member.getBizCatCd());
//        setBizTelNo(member.getBizTelNo());
//        setBizFaxNo(member.getBizFaxNo());
        setBizHotHpNo(member.getBizHotHpNo());
//        setBizHotHpAuthYn(member.getBizHotHpAuthYn());
//        setBizBpNm(member.getBizBpNm());
        setBizBpSocialNo(member.getBizBpSocialNo());
//        setBizZipCd(member.getBizZipCd());
//        setBizAddr(member.getBizAddr());
//        setBizAddrDtl(member.getBizAddrDtl());
//        setBizSailRegYn(member.getBizSailRegYn());
//        setBizSailRegNo(member.getBizSailRegNo());
//        setBizSailNoregCd(member.getBizSailNoregCd());
        /** 2009.4.9 추가컬럼 */
//        setAcctNo(member.getAcctNo());
//        setBackCd(member.getBackCd());
//        setAcctNm(member.getAcctNm());
//        setAuthYn(member.getAuthYn());
//        setFilePath(member.getFilePath());
//        setFileNm(member.getFileNm());
//        setFileSize(member.getFileSize());
        /** PC Suite 관련 */
//        setPcsuiteUseYn(member.getPcsuiteUseYn());
//        setPcsuiteLastUseDts(member.getPcsuiteLastUseDts());
//        setPcsuiteVersion(member.getPcsuiteVersion());
	}

	public void setDefaultMemberInfo(UserMember member) {
		setMbrNo(member.getMbrNo());
//      setMdnNo(member.getMdnNo());
		setMbrClsCd(member.getMbrClsCd());
		setMbrCatCd(member.getMbrCatCd());
//      setDevTpCd(member.getDevTpCd());
//      setDevMbrStatCd(member.getDevMbrStatCd());
		setMbrStatCd(member.getMbrStatCd());
//      setMobileCnt(member.getMobileCnt());
//      setMbrStartDt(member.getMbrStartDt());
//      setMbrEndDt(member.getMbrEndDt());
//      setMbrApprDt(member.getMbrApprDt());
		setMbrId(member.getMbrId());
		setMbrNm(member.getMbrNm());
//      setBirthDt(member.getBirthDt());
//      setBirthCls(member.getBirthCls());
//      setSex(member.getSex());
//      setZipCd(member.getZipCd());
//      setHomeAddr(member.getHomeAddr());
//      setHomeAddrDtl(member.getHomeAddrDtl());
		setEmailAddr(member.getEmailAddr());
//      setEmailYn(member.getEmailYn());
//      setRealNmAuthYn(member.getRealNmAuthYn());
//      setNateIdUseYn(member.getNateIdUseYn());
//      setNateIdStartDt(member.getNateIdStartDt());
//      setSmsYn(member.getSmsYn());
//      setPubAuthYn(member.getPubAuthYn());
      /** 담당자 관련 */
//      setOpNm(member.getOpNm());
//      setOpEmailAddr(member.getOpEmailAddr());
//      setOpTelNo(member.getOpTelNo());
//      setOpHpNo(member.getOpHpNo());
      /** 사업자 관련 */
		setCompNm(member.getCompNm());
		setBizRegNo(member.getBizRegNo());
//      setBizCondNm(member.getBizCondNm());
//      setBizKindNm(member.getBizKindNm());
//      setBizCatCd(member.getBizCatCd());
//      setBizTelNo(member.getBizTelNo());
//      setBizFaxNo(member.getBizFaxNo());
		setBizHotHpNo(member.getBizHotHpNo());
//      setBizHotHpAuthYn(member.getBizHotHpAuthYn());
//      setBizBpNm(member.getBizBpNm());
		setBizBpSocialNo(member.getBizBpSocialNo());
//      setBizZipCd(member.getBizZipCd());
//      setBizAddr(member.getBizAddr());
//      setBizAddrDtl(member.getBizAddrDtl());
//      setBizSailRegYn(member.getBizSailRegYn());
//      setBizSailRegNo(member.getBizSailRegNo());
//      setBizSailNoregCd(member.getBizSailNoregCd());
      /** 2009.4.9 추가컬럼 */
//      setAcctNo(member.getAcctNo());
//      setBackCd(member.getBackCd());
//      setAcctNm(member.getAcctNm());
//      setAuthYn(member.getAuthYn());
//      setFilePath(member.getFilePath());
//      setFileNm(member.getFileNm());
//      setFileSize(member.getFileSize());
      /** PC Suite 관련 */
//      setPcsuiteUseYn(member.getPcsuiteUseYn());
//      setPcsuiteLastUseDts(member.getPcsuiteLastUseDts());
//      setPcsuiteVersion(member.getPcsuiteVersion());
	}

	/**
	 * 세션과 관련된 필수 정보들을 설정
	 * @param loginUserInfo
	 */
	public void setSessionInfo(LoginUserInfo loginUserInfo) {
		setMemberType(loginUserInfo.getMemberType());
		setLoginPath(loginUserInfo.getLoginPath());
	}
}
